Optimal. Leaf size=33 \[ \frac {\sec ^2(x)}{2 a}+\frac {\tanh ^{-1}(\sin (x))}{2 a}-\frac {\tan (x) \sec (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {3872, 2706, 2606, 30, 2611, 3770} \[ \frac {\sec ^2(x)}{2 a}+\frac {\tanh ^{-1}(\sin (x))}{2 a}-\frac {\tan (x) \sec (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2606
Rule 2611
Rule 2706
Rule 3770
Rule 3872
Rubi steps
\begin {align*} \int \frac {\sec (x)}{a+a \csc (x)} \, dx &=\int \frac {\tan (x)}{a+a \sin (x)} \, dx\\ &=\frac {\int \sec ^2(x) \tan (x) \, dx}{a}-\frac {\int \sec (x) \tan ^2(x) \, dx}{a}\\ &=-\frac {\sec (x) \tan (x)}{2 a}+\frac {\int \sec (x) \, dx}{2 a}+\frac {\operatorname {Subst}(\int x \, dx,x,\sec (x))}{a}\\ &=\frac {\tanh ^{-1}(\sin (x))}{2 a}+\frac {\sec ^2(x)}{2 a}-\frac {\sec (x) \tan (x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 17, normalized size = 0.52 \[ \frac {\frac {1}{\sin (x)+1}+\tanh ^{-1}(\sin (x))}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 35, normalized size = 1.06 \[ \frac {{\left (\sin \relax (x) + 1\right )} \log \left (\sin \relax (x) + 1\right ) - {\left (\sin \relax (x) + 1\right )} \log \left (-\sin \relax (x) + 1\right ) + 2}{4 \, {\left (a \sin \relax (x) + a\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.75, size = 34, normalized size = 1.03 \[ \frac {\log \left (\sin \relax (x) + 1\right )}{4 \, a} - \frac {\log \left (-\sin \relax (x) + 1\right )}{4 \, a} + \frac {1}{2 \, a {\left (\sin \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.37, size = 33, normalized size = 1.00 \[ -\frac {\ln \left (-1+\sin \relax (x )\right )}{4 a}+\frac {1}{2 a \left (1+\sin \relax (x )\right )}+\frac {\ln \left (1+\sin \relax (x )\right )}{4 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 31, normalized size = 0.94 \[ \frac {\log \left (\sin \relax (x) + 1\right )}{4 \, a} - \frac {\log \left (\sin \relax (x) - 1\right )}{4 \, a} + \frac {1}{2 \, {\left (a \sin \relax (x) + a\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.21, size = 20, normalized size = 0.61 \[ \frac {\mathrm {atanh}\left (\sin \relax (x)\right )}{2\,a}+\frac {1}{2\,a\,\left (\sin \relax (x)+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sec {\relax (x )}}{\csc {\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________